package com.hzdl.car.mapper;

import com.hzdl.car.bean.Menu;
import com.hzdl.car.bean.Role;
import com.hzdl.car.vo.RoleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleMapper {
    List<Role> findByWhere(RoleVo roleVo);

    int deleteRoleMenuByRoleId(Integer rid);
    int deleteUserRoleByUid(Integer uid);

    int add(@Param("rid")Integer rid , @Param("mid") Integer mid);

    List<Menu> findMenuByRid(Integer rid);

    int add1(RoleVo roleVo);

    int update(RoleVo roleVo);

    int delete(Integer id);
    List<Role> findAll();

    List<Role> findByUid(Integer id);

    int insertUserRole(@Param("uid") Integer uid , @Param("rid") Integer rid);
}
